1. Field of the Invention
The present invention relates to an image processing apparatus, an image capture apparatus provided with the same, and a method for controlling the image processing apparatus, and more particularly to technology for correcting image quality degradation.
2. Description of the Related Art
In recent years, images captured by image capture apparatuses such as digital cameras have become more likely to suffer image quality degradation caused by the optical characteristics of the lens and camera shake, following the advent of more compact devices, wider angle lenses, and sensors with higher pixel counts. Distortion aberration is an example of image quality degradation due to the optical characteristics of the lens. On the other hand, camera shake causes unintended rotational and translational motion of the camera by the photographer, and thus produces image quality degradation such as translational movement, rotation and tilt in captured images. Also, image sensors employing a rolling shutter such as CMOS sensors, in which the exposure timing differs every line, causes a phenomenon known as rolling shutter distortion whereby a captured image is distorted due to camera shake and motion of the subject.
In order to correct such image quality degradation, technology that applies a plurality of geometric deformation processes to captured images has been proposed, with Japanese Patent Laid-Open No. 2010-273245 disclosing a method of correcting image quality degradation due to distortion aberration and camera shake by geometric deformation processes.
Here, processes for geometrically deforming an image will be described using FIG. 10A.
An output image area 1002 is provided within a captured area 1001. Also, it is assumed that while the photographer tried to capture a subject 1004 that is standing vertically upright in the middle of the output image area, camera shake caused the image capture apparatus to rotate parallel to an image capture plane, and the subject ended up being captured like a subject 1005.
In this case, by replacing the pixel of the coordinates (Xn, Yn) of the output image area with the pixel of the coordinates (Xn′, Yn′) of an area 1003 shown by a dotted line, the subject 1005 is deformed to be like the subject 1004 (image quality degradation due to camera shake is corrected).
Processing that involves replacing the pixels of given coordinates within an image with reference to the pixels of other coordinates in this way is called geometric deformation of an image. The pixels that are referenced at this time are called reference pixels, and the area that is formed by the reference pixels is called a reference area. In FIG. 10A, (Xn′, Yn′) is a reference pixel, and the area 1003 shown by the dotted line is a reference area.
However, in the case where geometric deformation is performed using a reference area that sticks out from the captured area, pixels that should be referenced in the area of the reference area that sticks out from the captured area do not exist, resulting in the loss of a portion of the image after geometric deformation.
This problem will be described using FIG. 10B. In comparison with FIG. 10A, the size of an output image area 1007 is the same but a captured area 1006 is smaller. Here, to correct similar camera shake to the case of FIG. 10A by geometric deformation, the pixels of a reference area 1008 need to be referenced. However, hatched portions 1011 of the reference area 1008 stick out from the captured area 1006, and pixels that should be referenced do not exist.
Accordingly, when an output image is generated using the reference area 1008 as is, an area equivalent to the portions indicated by reference numeral 1011 will be lost.
This also applies to Japanese Patent Laid-Open No. 2010-273245. While it is conceivable to change the reference area in order to avoid partial loss of an image that has undergone geometric deformation, the way in which the reference area should be changed is not easy to determine in cases such as Japanese Patent Laid-Open No. 2010-273245 which performs a plurality of geometric deformation processes.